home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1997 / HAM Radio 1997.iso / vbxs / crwvbx02 / publishr.bas < prev    next >
BASIC Source File  |  1996-04-08  |  1KB  |  61 lines

  1. '=============
  2. ' PUBLISHR.BAS
  3. '=============
  4. Option Explicit
  5. DefInt A-Z
  6.  
  7.  
  8.  
  9. '
  10. ' This application demonstrates use of the Crystal Reports VBX.
  11. ' tips I've picked up over the last year.  While I normally go
  12. ' into more detail with my own programs, I really wanted this
  13. ' program to be as simple as possible.  The whole idea is to
  14. ' provide a working example of how the Crystal VBX can be used.
  15. '
  16. Sub Main ()
  17.  
  18.   On Error GoTo MainError
  19.   
  20.   Dim x As Integer
  21.  
  22.   Screen.MousePointer = HOURGLASS
  23.   frmWorking.Show
  24.   SetWindowPos frmWorking.hWnd, -1, 0, 0, 0, 0, &H1 + &H2
  25.   DoEvents
  26.   
  27.   '--in my usual routines I use the application path or read this
  28.   '  from an INI file.  For this example, just set the path to the
  29.   '  location of the BIBLIO.MDB file that came with VB.  Be sure to
  30.   '  use the trailing "\".
  31.   CommonDir$ = "c:\vb\vbpro3\"
  32.   CrLf = Chr$(13) & Chr$(10)
  33.  
  34.   frmPublishers.Show
  35.   DoEvents
  36.   
  37.   Unload frmWorking
  38.   Screen.MousePointer = DEFAULT
  39.   Exit Sub
  40.  
  41. MainError:
  42.   frmWorking.Hide
  43.   Screen.MousePointer = DEFAULT
  44.   x = CriticalErrorHandler(Err)
  45.   Exit Sub
  46.  
  47. End Sub
  48.  
  49. Function VerifyDeleteRecord () As Integer
  50.  
  51.   Message$ = "Delete this record from the Database?"
  52.   Style = 308
  53.   Title$ = "WARNING!"
  54.   Answer = MsgBox(Message$, Style, Title$)
  55.   If Answer = 6 Then
  56.     VerifyDeleteRecord = True
  57.   End If
  58.  
  59. End Function
  60.  
  61.